package com.woniu.cloud.movie.api;

import com.woniu.cloud.movie.api.dto.Result;
import com.woniu.cloud.movie.api.exception.mv.MovieException;
import com.woniu.cloud.movie.api.param.movieParam.MovieAddParam;
import com.woniu.cloud.movie.api.param.movieParam.MovieChangeParam;
import com.woniu.cloud.movie.api.param.movieParam.MovieDeleteParam;
import com.woniu.cloud.movie.api.param.movieParam.MovieLikeGetsParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @ClassName 类名： MovieApi
 * @Description 描述：
 * @Author haotian
 * @Date 时间：2022/1/12 11:30 上午
 * @Param 参数：
 * @Retrun 返回：
 **/
@FeignClient("movie3")
public interface MovieApi {
    @PostMapping("/movie/save")
    public Result addMovie(@RequestBody MovieAddParam movieAddParam) throws MovieException;

    /**
     * @作者: haotian
     * @描述：上架movie
     * @时间：2022/1/11 6:32 下午
     * @参数：[id]
     * @参数类型:[java.lang.Integer]
     * @返回：com.woniuxy.cloud.boss.entity.Result
     **/
    @GetMapping("/movie/up/{id}")
    public Result upMovie(@PathVariable("id") Integer id) throws MovieException;


    /**
     * @作者: haotian
     * @描述：下架movie
     * @时间：2022/1/11 6:32 下午
     * @参数：[id]
     * @参数类型:[java.lang.Integer]
     * @返回：com.woniuxy.cloud.boss.entity.Result
     **/
    @GetMapping("/movie/down/{id}")
    public Result downMovie(@PathVariable("id") Integer id) throws MovieException;
    /**
     * @作者: haotian
     * @描述：模糊查询并分页movie
     * @时间：2022/1/11 6:32 下午
     * @参数：[movieLikeGetsParam]
     * @参数类型:[com.woniuxy.cloud.boss.param.movieParam.MovieLikeGetsParam]
     * @返回：com.woniuxy.cloud.boss.entity.Result
     **/
    @PostMapping("/movie/like")
    public Result likeMovie(@RequestBody MovieLikeGetsParam movieLikeGetsParam) throws MovieException;
    /**
     * @作者: haotian
     * @描述：逻辑删除movie
     * @时间：2022/1/11 6:32 下午
     * @参数：[id]
     * @参数类型:[java.lang.Integer]
     * @返回：com.woniuxy.cloud.boss.entity.Result
     **/
    @GetMapping("/movie/delete/{id}")
    public Result deleteMovie(@PathVariable("id") Integer id) throws MovieException;
    /**
     * @作者: haotian
     * @描述：逻辑批量删除movie
     * @时间：2022/1/11 6:33 下午
     * @参数：[dele]
     * @参数类型:[com.woniuxy.cloud.boss.param.movieParam.MovieDeleteParam]
     * @返回：com.woniuxy.cloud.boss.entity.Result
     **/
    @PostMapping("/movie/deletes")
    public Result deleteMovies(@RequestBody MovieDeleteParam dele) throws MovieException;
    /**
     * @作者: haotian
     * @描述：根据id查询movie
     * @时间：2022/1/11 6:33 下午
     * @参数：[id]
     * @参数类型:[java.lang.Integer]
     * @返回：com.woniuxy.cloud.boss.entity.Result
     **/
    @GetMapping("/movie/sel/{id}")
    public Result getMovie(@PathVariable("id") Integer id) throws MovieException;
    /**
     * @作者: haotian
     * @描述：改movie
     * @时间：2022/1/11 6:33 下午
     * @参数：[movieChangeParam]
     * @参数类型:[com.woniuxy.cloud.boss.param.movieParam.MovieChangeParam]
     * @返回：com.woniuxy.cloud.boss.entity.Result
     **/
    @PostMapping("/movie/update")
    public Result changeMovie(@RequestBody MovieChangeParam movieChangeParam) throws MovieException;
}
